package com.jiangxjsy.admin.service.impl;

import com.jiangxjsy.admin.mapper.AdminRoleMenuMapper;
import com.jiangxjsy.admin.service.AdminRoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * wukong-crm-master
 * 蒋胜宇
 * 2025/6/6 17:25
 */

@Service
public class AdminRoleMenuServiceImpl implements AdminRoleMenuService {
    @Resource
    private AdminRoleMenuMapper adminRoleMenuMapper;

    /**
     * 根据菜单id和角色id查询数量
     *
     * @param menuId 菜单id
     * @param roleIds 角色id
     * @return 角色菜单关联表数量
     */
    @Override
    public Integer countByMenuIdAndRoleIds(Long menuId, List<Integer> roleIds) {
        return adminRoleMenuMapper.countByMenuIdAndRoleIds(menuId, roleIds);
    }
}
